package com.woniuxy.dudugua.service.impl;

import com.woniuxy.dudugua.entity.Coupon;
import com.woniuxy.dudugua.mapper.CouponMapper;
import com.woniuxy.dudugua.service.AddCouponService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.Date;

@Service
public class AddCouponServiceImpl implements AddCouponService {
    @Resource
    private CouponMapper couponMapper;
    @Override
    public Integer addByCoupon(Coupon coupon) throws Exception {
        Integer integer = couponMapper.insert(coupon);
        if(integer!=0){
            return integer;
        }
        return 0;
    }
}
